<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>视频分类管理</title>
    <link href="<?php echo $_BASE_DIR ?>css_v1/style.css" rel="stylesheet" type="text/css"/>
    <link href="<?php echo $_BASE_DIR ?>css_v1/select.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/jquery.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/jmw.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/select-ui.min.js"></script>
    <script type="text/javascript" src="<?php echo $_BASE_DIR ?>js_v1/jquery.DatePicker.js"></script>

    <script type="text/javascript">
        $(document).ready(function (e) {
            $(".select1").uedSelect({
                width: 345
            });
            $(".select2").uedSelect({
                width: 167
            });
            $(".select3").uedSelect({
                width: 80
            });
        });
    </script>


</head>

<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="<?php echo url("leftmenu/bottom") ?>">首页</a></li>
        <li><a href="#">课程管理</a></li>
    </ul>
</div>
<form method="post" action="<?php echo url("educlass/index") ?>">
    <div style="clear: both;width:1100px;height:35px;line-height:35px;margin-bottom:5px;">
        <div class="rightinfo">
            <ul class="seachforms">
                <li>
                    <label>选择分类</label>
                    <div class="vocation">
                        <select name="cate_id" class="select2">
                            <option value="">请选择</option>
							<?php foreach ($catedata as $k => $v): ?>
                                <option value=<?php echo $k ?>><?php echo $v ?></option>
							<?php endforeach; ?>
                        </select>
                    </div>
                </li>
                <li><label>状态</label>
                    <div class="vocation">
                        <select name="status" class="select2">
                            <option value="">请选择状态</option>
                            <option value="1" <?php if (isset($param['status']) && $param['status'] === '1') echo 'selected'; else echo ''; ?>>
                                启用
                            </option>
                            <option value="0" <?php if (isset($param['status']) && $param['status'] === '0') echo 'selected'; else echo ''; ?>>
                                锁定
                            </option>

                        </select>
                    </div>
                </li>
                <li><label>&nbsp;</label><input type="submit" class="scbtn" value="查询" style="width:60px;"/></li>
            </ul>
        </div>
    </div>

</form>
<div class="tools">
    <ul class="toolbar">
        <li><a href="<?php echo url("educlass/add") ?>"><span><img
                            src="<?php echo $_BASE_DIR ?>images_v1/t01.png"/></span>添加</a>
        </li>
        <li><a href="#" onclick="editindex('id','<?php echo url("educlass/add") ?>/id/')"><span><img
                            src="<?php echo $_BASE_DIR ?>images_v1/t02.png"/></span>修改</a></li>
        <li class="click"><a href="#"
                             onclick="isDel('id','<?php echo url("educlass/del") ?>','ids[]')"><span><img
                            src="<?php echo $_BASE_DIR ?>images_v1/t03.png"/></span>删除</a></li>
    </ul>


</div>
<!---------------------------------------------------------------------------- -->

<script>
    $('#usedtime_timestart').datePicker({followOffset: [0, 24]});
    $('#usedtime_timeend').datePicker({followOffset: [0, 24]});
</script>
<form action="" method="post" name="form">

    <table class="tablelist">

        <thead>
        <tr>
            <th width="5%"><input type="checkbox" value="on" name="chkall" onClick="CheckAll(this.form)"/></th>
            <th width="10%">封面图</th>
            <th width="10%">课程名称</th>
            <th width="10%">价格</th>
            <th width="10%">所属分类</th>
            <th width="10%">排序</th>
            <th width="10%">标签</th>
            <th width="10%">销量</th>
            <th width="10%">库存</th>
            <th width="10%">状态</th>
        </tr>
        </thead>
        <tbody>
		<?php foreach ($item as $k => $v): ?>
            <tr>
                <td><input name="id" id="id" type="checkbox" value="<?php echo $v->id ?>"/></td>
                <td><img src="<?php echo $v->main_pic ?>" alt="" style="width: 80px;width: 80px"></td>
                <td><?php echo h($v->class_name) ?></td>
                <td><?php echo h($v->price) ?></td>
                <td><?php echo h($v->educategory->name) ?></td>
                <td><?php echo h($v->weight) ?></td>
                <td><?php echo h($v->tag_name) ?></td>
                <td><?php echo h($v->sale) ?></td>
                <td><?php echo h($v->stock) ?></td>
                <td><?php echo $v->status == 0 ? '锁定' : '启用'; ?></td>
            </tr>
		<?php endforeach; ?>
        </tbody>
    </table>

</form>

<?php echo Q::control('pagination', 'pagination', array('url_args' => $param, 'pagination' => $pagination, 'show_count' => 1)) ?>
</div>

<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>

</body>
<iframe id="excel" name="excel" width="0" height="0"></iframe>
</html>


